<template>
  <div class="pubAsk">
    <header>
      <van-icon name="arrow-left" @click="$router.go(-1)" />
      <h4>发提问</h4>
      <p>发布</p>
    </header>
    <main>
      <div class="title">
        <input
          type="text"
          maxlength="25"
          v-model="txt"
          placeholder="标题(必填) ：清晰的描述您的疑问6-25字"
        />
        <span>{{ txt.length }}/25</span>
      </div>
      <div class="content">
        <textarea rows="" cols="" placeholder="请详细的描述您的问题,最少20字">
        </textarea>
        <div class="add">
          <div class="add_video">添加视频</div>
          <div class="add_img">添加图片</div>
        </div>
        <p>上传视频和图片，医生更能对症下药（非必填）</p>
      </div>
      <div class="lable">
        <div class="lable_btn">
          <van-icon name="plus" />
          <span>添加标签</span>
        </div>
        <div class="lable_item">
          <p>添加标签，可让擅长的医生更快帮你解答</p>
          <van-switch v-model="checked" size="20px" />
        </div>
      </div>
    </main>
  </div>
</template>

<script>
export default {
  name: "pubAsk",
  data() {
    return {
      txt: "",
      checked: false,
    };
  },
};
</script>

<style lang="scss" scoped>
.pubAsk {
  font-size: 30px;
  header {
    // background-color: #ddd;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    height: 90px;
    border-bottom: 2px solid #ddd;
  }
  main {
    .title {
      width: 670px;
      height: 100px;
      margin: 25px auto;
      padding: 20px 0px;
      border-bottom: 2px solid #ddd;
      input {
        width: 590px;
        height: 60px;
        border: none;
      }
    }
    .content {
      border-bottom: 20px solid rgb(246, 246, 246);
      textarea {
        width: 100%;
        height: 300px;
        // background-color: red;
        border: none;
        padding-left: 30px;
      }
      .add {
        overflow: hidden;
        .add_video {
          width: 190px;
          height: 190px;
          background-color: rgb(230, 230, 230);
          float: left;
          margin: 0 30px;
          border-radius: 10px;
          border: 1px dotted rgb(255, 155, 155);
        }
        .add_img {
          width: 190px;
          height: 190px;
          background-color: rgb(230, 230, 230);
          float: left;
          border-radius: 10px;
          border: 1px dotted rgb(255, 155, 155);
        }
      }
      p {
        font-size: 20px;
        color: rgb(79, 79, 79);
        margin: 20px;
      }
    }
    .lable {
      .lable_btn {
        width: 200px;
        height: 60px;
        border-radius: 30px;
        line-height: 60px;
        background-color: rgb(219, 219, 219);
        margin: 30px;
        i {
          margin: 0 10px 0 10px;
        }
        span {
          font-size: 28px;
          color: rgb(177, 177, 177);
        }
      }
      .lable_item {
        height: 80px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        // background-color: red;
        margin: 30px;
      }
    }
  }
}
</style>